Optimal. Leaf size=58 \[ -\frac {x^{-2-n} (a+b x)^{1+n}}{a (2+n)}+\frac {b x^{-1-n} (a+b x)^{1+n}}{a^2 (1+n) (2+n)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 58, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {47, 37}
\begin {gather*} \frac {b x^{-n-1} (a+b x)^{n+1}}{a^2 (n+1) (n+2)}-\frac {x^{-n-2} (a+b x)^{n+1}}{a (n+2)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 37
Rule 47
Rubi steps
\begin {align*} \int x^{-3-n} (a+b x)^n \, dx &=-\frac {x^{-2-n} (a+b x)^{1+n}}{a (2+n)}-\frac {b \int x^{-2-n} (a+b x)^n \, dx}{a (2+n)}\\ &=-\frac {x^{-2-n} (a+b x)^{1+n}}{a (2+n)}+\frac {b x^{-1-n} (a+b x)^{1+n}}{a^2 (1+n) (2+n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 40, normalized size = 0.69 \begin {gather*} -\frac {x^{-2-n} (a+a n-b x) (a+b x)^{1+n}}{a^2 (1+n) (2+n)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.12, size = 41, normalized size = 0.71
method | result | size |
gosper | \(-\frac {\left (b x +a \right )^{1+n} x^{-2-n} \left (a n -b x +a \right )}{\left (2+n \right ) \left (1+n \right ) a^{2}}\) | \(41\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.91, size = 64, normalized size = 1.10 \begin {gather*} -\frac {{\left (a b n x^{2} - b^{2} x^{3} + {\left (a^{2} n + a^{2}\right )} x\right )} {\left (b x + a\right )}^{n} x^{-n - 3}}{a^{2} n^{2} + 3 \, a^{2} n + 2 \, a^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 328 vs.
\(2 (46) = 92\).
time = 16.28, size = 328, normalized size = 5.66 \begin {gather*} \begin {cases} - \frac {x^{- n} \left (b x\right )^{n}}{2 x^{2}} & \text {for}\: a = 0 \\\frac {a \log {\left (x \right )}}{a^{3} + a^{2} b x} - \frac {a \log {\left (\frac {a}{b} + x \right )}}{a^{3} + a^{2} b x} + \frac {a}{a^{3} + a^{2} b x} + \frac {b x \log {\left (x \right )}}{a^{3} + a^{2} b x} - \frac {b x \log {\left (\frac {a}{b} + x \right )}}{a^{3} + a^{2} b x} & \text {for}\: n = -2 \\- \frac {1}{a x} - \frac {b \log {\left (x \right )}}{a^{2}} + \frac {b \log {\left (\frac {a}{b} + x \right )}}{a^{2}} & \text {for}\: n = -1 \\- \frac {a^{2} n \left (a + b x\right )^{n}}{a^{2} n^{2} x^{2} x^{n} + 3 a^{2} n x^{2} x^{n} + 2 a^{2} x^{2} x^{n}} - \frac {a^{2} \left (a + b x\right )^{n}}{a^{2} n^{2} x^{2} x^{n} + 3 a^{2} n x^{2} x^{n} + 2 a^{2} x^{2} x^{n}} - \frac {a b n x \left (a + b x\right )^{n}}{a^{2} n^{2} x^{2} x^{n} + 3 a^{2} n x^{2} x^{n} + 2 a^{2} x^{2} x^{n}} + \frac {b^{2} x^{2} \left (a + b x\right )^{n}}{a^{2} n^{2} x^{2} x^{n} + 3 a^{2} n x^{2} x^{n} + 2 a^{2} x^{2} x^{n}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.50, size = 86, normalized size = 1.48 \begin {gather*} -{\left (a+b\,x\right )}^n\,\left (\frac {x\,\left (n+1\right )}{x^{n+3}\,\left (n^2+3\,n+2\right )}-\frac {b^2\,x^3}{a^2\,x^{n+3}\,\left (n^2+3\,n+2\right )}+\frac {b\,n\,x^2}{a\,x^{n+3}\,\left (n^2+3\,n+2\right )}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________